<?php
/**
 * Created by PhpStorm.
 * User: 周超
 * Date: 2016/11/17
 * Time: 17:50
 */

namespace App\Http\Routes;

use Illuminate\Contracts\Routing\Registrar;
class SearchBackRoute
{
    public function map(Registrar $router)
    {
        $router->group(['middleware' =>  ['web','auth','permissions.check'],
            'prefix' => 'backstage/searchs',], function ($router) {
            $router->get('list/{product_temp_category_id?}',['uses' =>'Backstage\SearchController@getList'])->name('get.searchs.list');
            $router->get('add',['uses' =>'Backstage\SearchController@getAdd'])->name('get.searchs.list.add');
            $router->post('search',['uses' =>'Backstage\SearchController@postSearch'])->name('post.searchs.list.search');
            $router->post('add',['uses' =>'Backstage\SearchController@postAdd'])->name('post.searchs.list.add');
            $router->post('search-style',['uses' =>'Backstage\SearchController@postSearchStyle'])->name('post.searchs.list.search-style');
            $router->post('search-crowd', [ 'uses' => 'Backstage\CrowdController@postJsonCrowdList'])->name('post.searchs.list.search-crowd');
            $router->post('search-colour', [ 'uses' => 'Backstage\ColourController@getAllColourList'])->name('post.searchs.list.search-colour');
            $router->post('search-brand', [ 'uses' => 'Backstage\BrandController@postSearchBrandList'])->name('post.searchs.list.search-brand');
            $router->get('delete/{search_id}',['uses' =>'Backstage\SearchController@getDelete'])->name('get.searchs.list.delete');
            $router->get('add-child/{search_id}',['uses' =>'Backstage\SearchController@getAddChild'])->name('get.searchs.list.add-child');
            $router->post('update-sort', [ 'uses' => 'Backstage\SearchController@postUpdateSort'])->name('post.searchs.list.update-sort');
        });
    }
}